home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7888 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: nntphost.st-and.ac.uk!bd
  2. From: bd@davaar.st-and.ac.uk (Brian Duff)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: gettimeofday() makes me mad !
  5. Date: 29 Feb 1996 15:22:04 GMT
  6. Organization: University of St. Andrews
  7. Message-ID: <BD.96Feb29152204@davaar.st-and.ac.uk>
  8. References: <4gnkth$4on@piston.ecp.fr> <4gu1ue$39m@news-f.iadfw.net>
  9. Reply-To: bd@st-and.ac.uk
  10. NNTP-Posting-Host: davaar.dcs.st-and.ac.uk
  11. In-reply-to: alpet@airmail.net's message of Tue, 27 Feb 1996 06:37:12 GMT
  12.  
  13. In article <4gu1ue$39m@news-f.iadfw.net> alpet@airmail.net (Adam Peterson) writes:
  14.  
  15.    dureta8@cti.ecp.fr (BIG ONE) wrote:
  16.  
  17.    >    Hello all. If someone could help...
  18.  
  19.    >COMPILER : gcc, or cc on a Unix system.
  20.  
  21.    >PROBLEM : I'm trying to make a little program which must repeat an
  22.    >action every .2 second for example ( less than 1 sec anyway). time()
  23.    >wouldn't fit, so I searched and found the function gettimeofday() in
  24.  
  25.    You are on a Unix system, any reason you are not using 'sleep'?
  26.  
  27.    Adam
  28.  
  29.  
  30. AFAIK, sleep can only take times in 1 second increments. Don't know
  31. about how to implement a shorter time, though. I'd like to know...
  32.  
  33. Brian
  34.  
  35.  
  36. --
  37. --
  38. I am Pentium of Borg.  You will be approximated, accuracy is futile!
  39.  
  40. |>     Brian Duff - University Of St. Andrews     |\
  41. |>     http://www-2nd-cs.dcs.st-and.ac.uk/~bd     |/
  42.